import https from '@/utils/request'
import type { LoginForm, LoginResponse } from './type'
enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info'
}
// 登录接口
export const login = (data: LoginForm) => https.post<any, LoginResponse>(API.LOGIN_URL, data)

// 获取用户信息
export const getUserInfo = () => https.get(API.USERINFO_URL)